using System.Data;
using System.Windows.Forms;

namespace IPAMS.Views
{
    /// <summary>
    /// This is an editor for the Evaluation tables:
    /// currentCurrenciesStatus, currentStocksStatus, fullTransactions
    /// </summary>
    public partial class EvaluationEditor : UserControl
    {
        public DSIPAMS.DTCurrentCashDataTable currentCurrenciesStatus;
        public DSIPAMS.DTCurrentStocksDataTable currentStocksStatus;
        public DSIPAMS.DTFullTransactionsDataTable fullTransactions;

        /// <summary>
        /// Initializes a new instance of the <see cref="EvaluationEditor"/> class.
        /// </summary>
        public EvaluationEditor()
        {
            InitializeComponent();
            InitializeComponentExtended();
            InitializeTables();
        }

        /// <summary>
        /// Initializes the component extended.
        /// </summary>
        private void InitializeComponentExtended()
        {
            currentCurrenciesStatus = new DSIPAMS.DTCurrentCashDataTable();
            currentStocksStatus = new DSIPAMS.DTCurrentStocksDataTable();
            fullTransactions = new DSIPAMS.DTFullTransactionsDataTable();
        }

        /// <summary>
        /// Initializes the tables.
        /// </summary>
        private void InitializeTables()
        {
            dgvCurrentStocksStatus.Columns[0].HeaderText = "Stock Symbol";
            dgvCurrentStocksStatus.Columns[1].HeaderText = "Stock Name";
            dgvCurrentStocksStatus.Columns[2].HeaderText = "Quantity";
            dgvCurrentCurrenciesStatus.Columns[0].HeaderText = "Currency";
            dgvCurrentCurrenciesStatus.Columns[1].HeaderText = "Amount";

            foreach (DataGridViewColumn dc in dgvCurrentCurrenciesStatus.Columns)
            {
                dc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            }
            foreach (DataGridViewColumn dc in dgvCurrentStocksStatus.Columns)
            {
                dc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            }
        }

       
    }
}